<!DOCTYPE html>
<html class="x-admin-sm" xmlns:th="http://www.thymeleleaf.org">
<head th:insert="base">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row">
        <form class="layui-form" action="" method="post">
            <input type="hidden" id="goodId" th:value="${auctionGood.id}"/>
            <div class="layui-form-item">
                <label class="layui-form-label">
                </label>
                <div class="layui-input-inline" style="margin: 10px 0">
                    <img class="layui-upload-img" id="goodImgShow" th:src="${auctionGood.goodImg}" width="200px" height="200px" style="vertical-align:middle;">
                </div>
                <div class="layui-form-mid layui-word-aux">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    拍品名称
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="goodName" name="goodName" th:value="${auctionGood.goodName}" readonly
                           autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    拍品数量
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="goodNum" name="goodNum" th:value="${auctionGood.goodNum}" readonly
                           autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    起拍价
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="startPrice" name="startPrice" th:value="${auctionGood.startPrice}" readonly
                           autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    拍品类别
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="goodsTypeName" name="goodsTypeName" th:value="${auctionGood.goodsTypeName}" readonly
                           autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">竞拍结束时间</label>
                <div class="layui-input-inline">
                    <input type="text" id="endTime" name="endTime" th:value="${#dates.format(auctionGood.endTime,'yyyy-MM-dd HH:mm:ss')}" readonly
                           autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label for="goodDesc" class="layui-form-label">拍品描述</label>
                <div class="layui-input-block">
                    <textarea placeholder="" id="goodDesc" readonly name="goodDesc" th:text="${auctionGood.goodDesc}" class="layui-textarea"></textarea>
                </div>
            </div>
        </form>
        <div class="layui-card-body ">
            <table class="layui-hide" id="tableId" lay-filter="tableId"></table>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
            </label>
            <a class="layui-btn layui-btn-xs" th:onclick="'xadmin.open(\'参与竞价\',\'/back/bidRecord/add?id='+${auctionGood.id}+'\',400,300);'" title="参与竞价"><i class="layui-icon "></i>参与竞价</a>
            <!--<a class="layui-btn layui-btn-xs" th:onclick="xadmin.open('参与竞价','/back/bidRecord/add?id='+'${auctionGood.id}',400,300);" title="参与竞价"><i class="layui-icon "></i>参与竞价</a>-->
        </div>
    </div>
</div>
<script th:inline="none">
    layui.use(['table','form','jquery','util'], function(){
        var form = layui.form;
        var $ = layui.jquery;
        var util = layui.util;
        var table = layui.table;
        var baseUrl = "/back/bidRecord";
        table.render({
            elem: '#tableId'
            ,id:'tableReload'
            ,url: baseUrl + '/getList'
            ,limit:10
            ,limits:[10,20,50]
            ,method:'post'
            ,defaultToolbar: ['print']
            ,where:{
                goodId:$("#goodId").val().trim()
            }
            ,title: '竞价记录列表'
            ,cols: [[
                {field: '', title: '序号',width:50,type:'numbers'}
                ,{field:'goodId', title:'拍品ID',type: 'text',width:100}
                ,{field:'goodName', title:'拍品名称',type: 'text',width:300}
                ,{field:'bidPrice', title:'我的竞拍价格',type: 'text',width:180}
                ,{field:'bidUserName', title:'竞拍人',type: 'text',width:180}
                ,{field:'createTime', title:'竞拍时间',type: 'text',width:250,templet:function (d) {
                        if(d.createTime){
                            return util.toDateString(d.createTime, "yyyy-MM-dd HH:mm:ss")
                        }
                        return "";
                    }}
            ]]
            ,page: true
        });


    });
</script>
</body>
</html>